package Day02;

import java.util.Scanner;

public class Demo08 {
    public static void main(String[] args) {
        //计算该年该月天数
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入年月份:  "+ "____" +  "年");
        System.out.println("____" + "月");
        int i = sc.nextInt();
        int j = sc.nextInt();
//        System.out.println(i);
//        System.out.println(j);
        //平年  整百年除以四百有余数为平年，反之则为闰年
        //非百整年除以四有余数为平年，反之为闰年
        switch (j) {
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12: {
                System.out.println("三十一天");
                break;
            }
            case 2:{
                if(i%100 == 0){
                    if(i%400 == 0) {
                        System.out.println("二十九天");
                    }else{
                        System.out.println("二十八天");
                    }
                }else if(i%4 == 0){
                    System.out.println("二十九天");
                }else{
                    System.out.println("二十八天");
                }
                break;
            }
            case 4:
            case 6:
            case 9:
            case 11:{
                System.out.println("三十天");
                break;
            }
        }



    }
}
